<?
require_once '../home/config.php';
ob_clean();

//lấy content
$rss = new rss(SITENAME,DOMAIN);
$db_listnew = new db_query('SELECT *
                             FROM products
                           WHERE pro_active = 1
                             LIMIT 20');
$listNew = $db_listnew->resultArray();
foreach($listNew as $new){
    $description = '<div align="center">
                     <a href="'.DOMAIN.generate_product_detail_url($new).'">
                        <img width="400" src="'.DOMAIN.product_images.$new['pro_image'].'" />
                     </a>
                  </div>
                  <br />'.$new['pro_description'];
    $rss->additem($new['pro_name'],$description,''.DOMAIN.generate_product_detail_url($new),''.DOMAIN.generate_product_detail_url($new),date('d/m/Y h:i:s a'));    
}
?>
<?header ("Content-Type:text/xml");?>
<?=$rss->getRSSContent()?>